<template>
  <el-card class="bb1">
    <div >
      <div class="bb2">
        <el-button @click="searchexam()" :type="examcreated">已创试卷</el-button>
        <el-button @click="searchpaper()" :type="examdone">已做试卷</el-button>
        <el-input
            v-model="search"
            class="bb3"
            placeholder="输入关键字搜索"/>
      </div>
      <router-view></router-view>
    </div>
  </el-card>
</template>

<script>
export default {
  data() {
    return {
      examcreated:'primary',
      examdone:'',
    }
  },
  methods:{
    searchexam(){
      this.examcreated='primary';
      this.examdone='';
      this.$router.push('/searchexam')
    },
    searchpaper(){
      this.examcreated='';
      this.examdone='primary';
      this.$router.push('/searchpaper')
    },

  },
  created() {
    this.$router.push('/searchexam')
  }

}
</script>

<style scoped>
.bb1{
  width: 60%;
  margin-left: 300px;
}
.bb2{
  width: 100%;
  height: 50px;
}
.bb3{
  width: 300px;
  float: right;
}

</style>

